package com.generator.statics.customerSalesStatics.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.generator.statics.customerSalesStatics.pojo.CustomCountCondition;
import com.generator.statics.customerSalesStatics.pojo.CustomerCount;
import com.generator.statics.customerSalesStatics.pojo.OrderOfProduct;
import com.generator.statics.customerSalesStatics.pojo.ProvinceCity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *      客户销量统计
 * @author 88168
 * @since 2022-10-01
 */
@Mapper
public interface CustomerCountMapper extends BaseMapper<CustomerCount> {
    /**
     *
     * @param page
     * @return 分页查询客户信息
     */
    public Page<CustomerCount> selectCustomCount(@Param("custname")String custname, Page<CustomerCount> page);

    /**
     *
     *
     * @return 分页查询客户信息
     */
    public List<CustomerCount> selectCustomCount2(@Param("custname")String custname);

    /**
     *
     * @param orderId
     * @return 根据订单查询 用户
     */
    public  List<CustomerCount> selectOneCustom(@Param("orderId") String orderId);
    /**
     *
     * @param orderId
     * @return 根据订单查询 商品
     */
    public List<OrderOfProduct> selectProductsByOrderId(@Param("orderId") String orderId);

    /**
     *
     * @param customCountCondition
     * @param page
     * @return 多条件查询
     */
    public Page<CustomerCount> selectByMoreContion(@Param("pojo") CustomCountCondition customCountCondition, @Param("page")Page<CustomerCount> page);
    /**
     *
     * @param pName
     * @return 返回省对应的城市
     */
    public List<ProvinceCity> cityByProvince(@Param("pName") String pName);
}
